package com.anlu.pattern.action.command;

/**
 * <p>
 * Description:TODO 详细描述
 * <p>
 * <p>
 *
 * @author anlu
 * @date 2022/10/13 9:49
 */
public class Client {
    public static void main(String[] args) {
        Stock abcStock = new Stock();
        //购买股票的命令
        BuyStock buyStockOrder = new BuyStock(abcStock);
        //抛售股票的命令
        SellStock sellStockOrder = new SellStock(abcStock);

        Broker broker = new Broker();
        broker.takeOrder(buyStockOrder);
        broker.takeOrder(sellStockOrder);



        broker.placeOrders();
        broker.undo();
    }
}
